]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
overviewControls: Fix bad expression causing incorrect thumbnails allocation
authorJasper St. Pierre <jstpierre@mecheye.net>
Sun, 3 Nov 2013 00:06:29 +0000 (20:06 -0400)
committerJasper St. Pierre <jstpierre@mecheye.net>
Sun, 3 Nov 2013 00:07:06 +0000 (20:07 -0400)
`a + b ? c : d` is parsed as `(a + b) ? c : d`, not the more intuitive
`a + (b ? c : d)`.

This was causing a bad slide animation and Clutter warnings when coming
out of the overview.

js/ui/overviewControls.js

index 98480c84da86e2665ae08c8d2aa5a9676833ce6c..cfe89a54af9c782a6592a6271d8af3e45bc44507 100644 (file)
@@ -68,7 +68,7 @@ const SlideLayout = new Lang.Class({
 
         let actorBox = new Clutter.ActorBox();
         actorBox.x1 = box.x1 + alignX + this._translationX;
-        actorBox.x2 = actorBox.x1 + child.x_expand ? availWidth : natWidth;
+        actorBox.x2 = actorBox.x1 + (child.x_expand ? availWidth : natWidth);
         actorBox.y1 = box.y1;
         actorBox.y2 = actorBox.y1 + availHeight;